package com.boesch.electroOffice.dataaccess.dao;

import java.util.List;

import com.boesch.electroOffice.dataaccess.common.IllegalDataAccessException;
import com.boesch.electroOffice.model.electroOffice.Identifier;

/**
 * This interface allocates all methods for IdentifierDaoImpl.
 * The methods are only called by the business layer.
 * If there is an error on executing the method, a IllegalDataAccessException will be thrown.
 * 
 * @author Ralph Koster
 *
 */
public interface IdentifierDao {

	/**
	 * Returns a Identifier object on the basis of its Id.
	 * If any error occures, a illegalDataAccessException is thrown.
	 * 
	 * @return Identifier identifier
	 * @throws IllegalDataAccessException e
	 */
	public Identifier getIdentifierById(int id) throws IllegalDataAccessException;

	/**
	 * Returns a Identifier object on the basis of its entity and identifier.
	 * If any error occures, a illegalDataAccessException is thrown.
	 * 
	 * @return Identifier identifier
	 * @throws IllegalDataAccessException e
	 */
	public Identifier getIdentifierByEntityAndIdentifier(String entity, String identifier) throws IllegalDataAccessException;

	/**
	 * Returns a list of all identifiers.
	 * If any error occures, a illegalDataAccessException is thrown.
	 * 
	 * @return List<Identifier> identifiers
	 * @throws IllegalDataAccessException e
	 */
	public List<Identifier> readAllIdentifiers() throws IllegalDataAccessException;

	/**
	 * Returns a list of identifiers on the basis of its entity.
	 * If any error occures, a illegalDataAccessException is thrown.
	 * 
	 * @return List<Identifier> identifiers
	 * @throws IllegalDataAccessException e
	 */
	public List<Identifier> readIdentifiersByEntity(String entity) throws IllegalDataAccessException;

	/**
	 * Returns a list of identifiers on the basis of its entity and subentity.
	 * If any error occures, a illegalDataAccessException is thrown.
	 * 
	 * @return List<Identifier> identifiers
	 * @throws IllegalDataAccessException e
	 */
	public List<Identifier> readIdentifiersByEntityAndSubentity(String entity, String subentity) throws IllegalDataAccessException;
}
